package com.jvm;

import com.sun.org.apache.bcel.internal.generic.LoadClass;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/**
 * @author yijy
 * @description
 * @create 2020/11/19 下午7:44
 **/
public class Test_002ClassLoader {

    public static void main(String[] args) {
        System.out.println(String.class.getClassLoader());
        System.out.println(Test_002ClassLoader.class.getClassLoader());
        System.out.println(Test_002ClassLoader.class.getClassLoader().getParent());
        System.out.println(Test_002ClassLoader.class.getClassLoader().getParent().getParent());
        System.out.println("AppClassLoader path : --------------------");
        String pathApp = System.getProperty("java.class.path");
        System.out.println(pathApp.replace(":", "\n"));

        System.out.println("\t ExtClassLoader path : --------------------");
        String pathExt = System.getProperty("java.ext.dirs");
        System.out.println(pathExt.replace(":", "\n"));

        System.out.println("\t bootClassLoader path : --------------------");
        String pathBoot = System.getProperty("sun.boot.class.path");
        System.out.println(pathBoot.replace(":", "\n"));

    }
}
